package Scnen3;

import javax.swing.*;
import java.awt.*;
import java.net.URL;

public class bg extends JPanel{
    Image im = null;
    int O2w;
    int O2h;
    public bg() {
        URL url = getClass().getResource("/Picture/goodbg2.png");
        ImageIcon imageIcon = new ImageIcon(url);
        im = imageIcon.getImage();
        O2w = imageIcon.getIconWidth();
        O2h= imageIcon.getIconHeight();
        setBounds(0,0,O2w,O2h);
    }
    public void paint(Graphics g){
        super.paint(g);
        g.drawImage(im,0,0,O2w,O2h,null);
    }
}
